package com.platform.service;

import com.platform.common.ServerResponse;
import com.platform.pojo.Attachment;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface IAttachmentService {

    ServerResponse<String> del(Integer id);
    String saveFileList(List<MultipartFile> fileList, String setPageName,
                        String path, String entityName,
                        String entityType, Integer entityId, HttpServletRequest request);
    ServerResponse<List<Attachment>> findByParam(String entityName, String entityType, Integer entityId);

    ServerResponse<String> insertAttachment(MultipartFile file, String setPageName,
                                            String path, String entityName,
                                            String entityType, Integer entityId);

    ServerResponse<Attachment> saveFile(String pageName,MultipartFile file,HttpServletRequest request);

    ServerResponse<Attachment> uploadImage(String pageName,String entityName,String entityType,
                                           String id,MultipartFile file,HttpServletRequest request);
}
